import { createSlice } from "@reduxjs/toolkit";

interface ContactInfoType {
  address: string;
  email: string;
  phone: string;
  qq: string;
}

const initialState: { contactInfo: ContactInfoType } = {
  contactInfo: {
    address: "",
    email: "",
    phone: "",
    qq: "",
  },
};

const contactInfoSlice = createSlice({
  name: "contactInfo",
  initialState,
  reducers: {
    setConcatInfo(state, action) {
      state.contactInfo = action.payload;
    },
  },
});

export default contactInfoSlice.reducer;
export const { setConcatInfo } = contactInfoSlice.actions;
